<template>
  <div style="height: 3000px">
    <detail-header></detail-header>
    <detail-banner
      :sightName="info.sightName"
      :bannerImg="info.bannerImg"
      :gallaryImgs="info.gallaryImgs"
    ></detail-banner>
    <div class="content">
      <detail-list :list="info.categoryList"></detail-list>
    </div>
  </div>
</template>

<script>
import DetailHeader from './components/Header'
import DetailBanner from './components/Banner'
import DetailList from './components/List'

export default {
  name: 'Detail',
  data() {
    return {
      info: {}
    }
  },
  methods: {
    getDetailInfo() {
      this.$http.get('/detail.json?id=' + this.$route.query.id)
        .then(this.handleGetDataSucc)
    },
    handleGetDataSucc(res) {
      res = res.data
      if (!res.ret) {
        return
      }
      this.info = res.data
    }
  },
  mounted() {
    this.getDetailInfo()
  },
  components: {
    DetailHeader,
    DetailBanner,
    DetailList
  }
}
</script>

<style lang="stylus" scoped>

</style>
